//
//  GQTodayRecommandCell.m
//  TingMusic
//
//  Created by sunny on 16/4/21.
//  Copyright © 2016年 sunny. All rights reserved.
//

#import "GQTodayRecommandCell.h"
#import "GQTodayRemmandItem.h"

@interface GQTodayRecommandCell ()
@property (weak, nonatomic) IBOutlet UILabel *authorLabel;
@property (weak, nonatomic) IBOutlet UIImageView *mvImageView;
@property (weak, nonatomic) IBOutlet UILabel *albumTitleLabel;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *sqWidthConstraint;


@end

@implementation GQTodayRecommandCell

- (void)setTodayRemmandItem:(GQTodayRemmandItem *)todayRemmandItem
{
    _todayRemmandItem = todayRemmandItem;
    
    self.authorLabel.text = todayRemmandItem.author;
    self.albumTitleLabel.text = todayRemmandItem.album_title;
    self.mvImageView.hidden = todayRemmandItem.has_mv == NO;
    if (![todayRemmandItem.all_rate containsString:@"flac"]) {
        self.sqWidthConstraint.constant = 18;
    } else {
        self.sqWidthConstraint.constant = 0;
    }
}

@end
